home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / prolog / brklyprl.lha / Emulator / inst_table.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-04-14  |  722 b   |  36 lines

  1.  
  2. /* Copyright (C) 1988, 1989 Herve' Touati, Aquarius Project, UC Berkeley */
  3.  
  4. /* Copyright Herve' Touati, Aquarius Project, UC Berkeley */
  5.  
  6. enum {
  7. #define NAMES
  8. #define use(String,ID,Function,Arg1,Arg2,Arg3)ID,
  9. #include "instructions.h"
  10. #undef use
  11. #undef NAMES
  12.   LAST_INSTRUCTION
  13.   };
  14.  
  15. #define NAMES
  16. #define use(String,ID,Function,Arg1,Arg2,Arg3)\
  17. extern void Function();
  18. #include "instructions.h"
  19. #undef use
  20. #undef NAMES
  21.  
  22. struct InstrType {
  23.   char* name;
  24.   int ID;
  25.   int ArgType[3];
  26.   void (*exec)();
  27.   void fill(Instr& instr, char** p);
  28.   void update(Instr& instr, int update_what);
  29.   void print(Instr& instr);
  30. };
  31.  
  32. extern InstrType instr_types[];
  33. extern HashTable instr_ID;
  34. extern void init_instr_types(Scan& scanner);
  35.  
  36.